import http from '@/utils/http'
const env = import.meta.env
const BASE_URL = env.PROD ? `${env.VITE_API_BASE_URL}/channelAdmin` : '/channelAdmin'

/** @desc 渠道方管理-收益列表明细 */
export function channelIncomeList(data: any) {
  return http.post(`${BASE_URL}/v1/channel/incomeList`, { ...data })
}

/** @desc 渠道方管理-账号详情 */
export function channelIncomeDetail(data: any) {
  return http.post(`${BASE_URL}/v1/channel/detail`, { ...data })
}

/** @desc 渠道方管理-发送验证码 */
export function channelIncomeSendCode(data: any) {
  return http.post(`${BASE_URL}/v1/sms/sendCode`, { ...data })
}

/** @desc 渠道方管理-分佣管理修改比例 */
export function channelIncomeEdit(data: any) {
  return http.post(`${BASE_URL}/v1/channel/edit`, { ...data })
}

/** @desc 渠道方管理-修改密码 */
export function userChangePassword(data: any) {
  return http.post(`${BASE_URL}/v1/channel/editPassword`, { ...data })
}

/** @desc 渠道方管理-渠道提现-基础信息 */
export function withdrawalBasicInfo(data: any) {
  return http.post(`${BASE_URL}/v1/withdrawal/basicInfo`, { ...data })
}

/** @desc 渠道方管理-渠道提现-绑定支付宝发送短信 */
export function withdrawalBindAlipaySms(data: any) {
  return http.post(`${BASE_URL}/v1/withdrawal/bindAlipaySms`, { ...data })
}

/** @desc 渠道方管理-渠道提现-绑定支付宝 */
export function withdrawalAlipayBind(data: any) {
  return http.post(`${BASE_URL}/v1/withdrawal/alipayBind`, { ...data })
}

/** @desc 渠道方管理-渠道提现-账单明细 */
export function withdrawalIncomeList(data: any) {
  return http.post(`${BASE_URL}/v1/withdrawal/incomeList`, { ...data })
}

/** @desc 渠道方管理-渠道提现-提现 */
export function withdrawalApply(data: any) {
  return http.post(`${BASE_URL}/v1/withdrawal/apply`, { ...data })
}
